﻿<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>对辅导员的增删改</title>
    <link rel="stylesheet" href="${request.getContextPath}/static/css/Fudaoyuan.css">
    <link rel="stylesheet" href="${request.getContextPath}/static/css/reset.css">
    <script type="text/javascript" src="${resquest.getContextPath}/static/js/jquery-1.12.4.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${resquest.getContextPath}/static/bootstrap-3.3.7-dist/css/bootstrap.min.css">
    <script type="text/javascript" src="${resquest.getContextPath}/static/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
</head>
<body>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Modal title</h4>
            </div>
            <div class="modal-body">
                ...
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save changes</button>
            </div>
        </div>
    </div>
</div>

<div class="head">
    <img src="${request.getContextPath}/static/img/head3.png" height="64" width="64"/>
    <p>你好！<a href="#">xxx</a>欢迎登陆！&nbsp&nbsp<a class="a1" href="#">退出登录!</a></p>
</div>
<!--头部结束-->
<div class="cont">
    <div class="cont_1">
            <img src="${request.getContextPath}/static/img/wk1.png" height="80" width="90"/>
            <p>对教师的管理</p>
    </div>
    <div class="tjia">
        <a href="/Fudaoyuan"><p class="pp1">教师管理</p></a>
        <a href="/Fudaoyuan_2"><p>添加教师</p></a>
        <a href="/Fudaoyuan_3"><p style="width: 110px">修改教师信息</p></a>
        <a href="/index"><p>返回首页</p></a>
    </div>
<table border="1" class="tab">
    <tr>
    <th>教师工号(aid)</th>
    <th>姓名(aname)</th>
    <th>密码(apassword)</th>
    <th>电话(atelphone)</th>
    <th>操作</th>
    </tr>
    <c:forEach items="${pageInfo.list }" var="admin">
        <tr>
            <th>${admin.aid }</th>
            <th>${admin.aname }</th>
            <th>${admin.apassword }</th>
            <th>${admin.atelphone }</th>
            <th>
                <button class="btn btn-primary btn-sm">
                    <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
                    编辑
                </button>
                <button class="btn btn-danger btn-sm">
                    <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
                    <a href="/Fudaoyuan/${admin.aid}" class="btn-danger">删除</a>
                </button>
            </th>
        </tr>
    </c:forEach>
</table>
    <!-- 显示分页信息 -->
    <div class="row">
        <!--分页文字信息  -->
        <div class="col-md-6">当前 ${pageInfo.pageNum }页,总${pageInfo.pages }
            页,总 ${pageInfo.total } 条记录</div>
        <!-- 分页条信息 -->
        <div class="col-md-6">
            <nav aria-label="Page navigation">
                <ul class="pagination">
                    <li><a href="/Fudaoyuan?pn=1">首页</a></li>
                    <c:if test="${pageInfo.hasPreviousPage }">
                        <li><a href="/Fudaoyuan?pn=${pageInfo.pageNum-1}"
                               aria-label="Previous"> <span aria-hidden="true">&laquo;</span>
                        </a></li>
                    </c:if>


                    <c:forEach items="${pageInfo.navigatepageNums }" var="page_Num">
                        <c:if test="${page_Num == pageInfo.pageNum }">
                            <li class="active"><a href="#">${page_Num }</a></li>
                        </c:if>
                        <c:if test="${page_Num != pageInfo.pageNum }">
                            <li><a href="/Fudaoyuan?pn=${page_Num }">${page_Num }</a></li>
                        </c:if>

                    </c:forEach>
                    <c:if test="${pageInfo.hasNextPage }">
                        <li><a href="/Fudaoyuan?pn=${pageInfo.pageNum+1 }"
                               aria-label="Next"> <span aria-hidden="true">&raquo;</span>
                        </a></li>
                    </c:if>
                    <li><a href="/Fudaoyuan?pn=${pageInfo.pages}">末页</a></li>
                </ul>
            </nav>
        </div>
    </div>

</div>

</body>
</html>